Skip to content

feat(preprod): Add grace period before failing status check for missing base#115448

Merged
NicoHinderling merged 2 commits into
masterfrom
feat/preprod-waiting-for-base-template
May 12, 2026
Merged

feat(preprod): Add grace period before failing status check for missing base#115448
NicoHinderling merged 2 commits into
masterfrom
feat/preprod-waiting-for-base-template

Conversation

@NicoHinderling
Copy link
Copy Markdown
Contributor

When a head snapshot uploads before its base build (e.g., due to network timing), the status check task immediately posts a FAILURE to GitHub with "No base snapshots found." This is a false negative — the base just hasn't arrived yet.

This adds a grace period: instead of failing immediately, the task posts an IN_PROGRESS status ("Waiting for base snapshots...") and schedules a delayed self-invocation (10 minutes). If the base arrives before the timeout, the existing comparison flow re-triggers the status check which takes the normal path — the timeout task becomes a harmless no-op. If the base never arrives, the timeout flips it to FAILURE.

The approach is event-driven rather than poll-based: no retries, no new state to maintain. The task re-runs the same idempotent logic and queries the DB for current truth.

Companion to #115446 which adds the matching "Waiting for base" UI state in the frontend.

…ng base

When a head snapshot uploads before its base build, the status check
previously posted an immediate FAILURE to GitHub. Now it posts
IN_PROGRESS ("Waiting for base snapshots...") and schedules a delayed
timeout task (10 minutes). If the base arrives before the timeout, the
existing comparison flow re-triggers the status check which runs the
normal path. If not, the timeout flips it to FAILURE.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 12, 2026
mypy inferred the dict values as `object` because it holds two
different task types, causing an "object not callable" error at the
call site.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@NicoHinderling NicoHinderling marked this pull request as ready for review May 12, 2026 22:43
@NicoHinderling NicoHinderling requested a review from a team as a code owner May 12, 2026 22:43
Comment thread src/sentry/preprod/vcs/status_checks/snapshots/tasks.py
@NicoHinderling NicoHinderling merged commit b493f8b into master May 12, 2026
63 checks passed
@NicoHinderling NicoHinderling deleted the feat/preprod-waiting-for-base-template branch May 12, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants